<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"      
xmlns:p="http://primefaces.org/ui">


	<head>
		<title>detail</title>
	</head>
		<f:view>
			<body>
			<h2>about patient</h2>
				<h3>--test patient</h3>
			<h:form>
			<h:inputText id="patsex" value="#{patientBean.patient.pat_sex}"/>
            <h:commandButton id="submit" action="#{patientBean.getPatientBySex}" value="go with sex"/>
          
				<h:dataTable value="#{patientBean.allPatient}" var="pat">
					<h:column>
						<f:facet name="header">
							<h:outputText value="序号" />
						</f:facet>   
     					<h:outputText value="#{pat.pk}"/>
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="姓名" />
						</f:facet>  
						<h:outputText value="#{pat.pat_name}"/>
  					</h:column>
  					<h:column>
						<f:facet name="header">
							<h:outputText value="ID" />
						</f:facet>   
     					<h:outputText value="#{pat.pat_id}"/>
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="年龄" />
						</f:facet> 
						<h:outputText value="#{pat.pat_age}"/>
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="性别" />
						</f:facet>
						<h:outputText value="#{pat.pat_sex}"/>
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="住址" />
						</f:facet>
						<h:outputText value="#{pat.pat_address}"/>
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="出生年月" />
						</f:facet>
						<h:outputText value="#{pat.pat_birthday}"/>
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="创建日期" />
						</f:facet>
						<h:outputText value="#{pat.created_time}"/>
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="更新日期" />
						</f:facet>
						<h:outputText value="#{pat.updated_time}"/>
					</h:column>
					<h:column>
						<h:outputLink type="submit" value ="faces/findstudy.xhtml">
						<f:param name = "pat_pk" value = "#{pat.pk}"/>
							<h:outputText value = "more"/>
						</h:outputLink>
					</h:column>
					<h:column>
						<h:outputLink type="submit" value ="faces/edit.xhtml">
						<f:param name = "pat_pk" value = "#{pat.pk}"/>
							<h:outputText value = "edit"/>
						</h:outputLink>
					</h:column>
					
				</h:dataTable>
		
			</h:form>
		</body>
	</f:view> 
</html>